package com.ityedao.IO数据流;

import java.io.DataOutputStream;
import java.io.FileOutputStream;

public class DataOutputStreamTest {
    public static void main(String[] args) {
        try (
                DataOutputStream dos =
                        new DataOutputStream(
                                new FileOutputStream("src/IO-数据流out.txt"));
        ) {
            dos.writeInt(97);
            dos.writeDouble(99.5);
            dos.writeBoolean(true);
            dos.writeUTF("程序员666");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
